 <link rel="stylesheet" href="../Public/style/forum.css" />
 	 <div id="top">
		 <div class="head1 clear">
			 <div class="account sprite_icon" style="text-align:center; ">
                  <a href="index.php?g=Mobile&m=User&a=index" style=" color:#FFF; line-height:50px">
                 {if cookie('username')}
                  {php $user=M('User')->field('username')->where('id='.$jgsatuserid)->find()}
                  {php echo $user['username']} 
                 {else}登录
                 {/if}
                 </a>
			 </div>
			   {if $title}
			    <div class="title">{$title}</div> 
               {else}
                <div class="title">{$seo_title}</div> 
               {/if}<div class="search sprite_icon">
			     <span class="icon2 icon_com"></span>
			 </div>
		 </div>
	 </div> 
 <include file="Mobile:nav"/>     
	 

	 <div class="top">
		 <div class="explain">
			 <span class="icon1 icon_com"></span>
			 <strong>{$plate['name']}</strong>
			 <p>{$plate['explain']}</p>
		 </div>

		 <div class="navegation">
			 <span class="all_post active">全部帖子</span>
			 <span class="icon2 icon_com"></span>

			 <ul class="choose_post">
				 <li class="active1">
					 <a href="index.php?g=Mobile&m=Zforum_theme&a=forumlist&id=7&plateid={$plate[id]}&order=essence" class="clear">
						 <span ></span>
						 <strong>精华</strong>
					 </a>
			     </li>
				 <li>
					 <a href="index.php?g=Mobile&m=Zforum_theme&a=forumlist&id=7&plateid={$plate[id]}&order=hits" class="clear">
						 <span class="icon4 icon_com"></span>
						 <strong>热门</strong>
					 </a>
			     </li>
				<!-- <li>
				     <a href="javascript:;" class="clear">
						 <span class="icon5 icon_com"></span>
						 <strong>置顶</strong>
					 </a>
			     </li>-->
			 </ul>

			 <div class="post_arrow"></div>
		 </div>
	 </div>

	 <div class="post_list">
     
      <?php if( empty($_GET['p']) || $_GET['p']==1): $_result=M("Zforum_theme")->field("*")->where("plateid=".$plate['id']." and top=1 and lang=1 AND status=1 ")->order("updatetime desc ,id desc")->limit("3")->select();if ($_result):?>
		 <div class="section3">
			 <h3>本版置顶</h3>
			 <?php    $i=0;foreach($_result as $key=>$r):++$i;$mod = ($i % 2 );?>
             <div class="section Padding no_margin_bottom">
				 <a href="index.php?g=Mobile&m=Zforum_reply&a=index&id={$r['id']}&plateid={$plate['id']}">
					 <div class="title clear">
						 <h2><span class="color">【{$plate['name']}】</span>{$r['title']}</h2>
						<!-- <span class="icon1 com"></span>-->
						 {if $r['essence']==1 }<span class="icon2 com"></span>{/if}
						 <span class="icon2-1 com"></span>
					 </div>
					 <div class="source">
						 <span class="name">{$r['username']}</span><i>|</i><em class="time">{$r['createtime']|remianday=###}</em>
					 </div>
					 <div class="I_icon clear">
						 <span class="icon3 com"></span><em>{$r['hits']}</em>
						 <span class="icon4 com"></span><em>{$r['like_num']}</em>
						 <span class="icon5 com"></span><em>{$r['reply_num']}</em>

						 <i class="time">{if $r['updatetime']}{$r['updatetime']|remianday=###}{/if}</i>
					 </div>
				 </a>
			 </div>
           <?php endforeach;?>
		 </div>
<?php  endif; endif;?>

		 <div class="section4" id="tabajax"> 
			 <h3>版块主题</h3>
			 
        <volist name="list" id="r">
			 <div class="section Padding">
				 <a href="index.php?g=Mobile&m=Zforum_reply&a=index&id={$r['id']}&plateid={$plate['id']}">
					 <div class="title clear">
						 <h2><span class="color">【{$plate['name']}】</span>{$r['title']}</h2>
						<!-- <span class="icon1 com"></span>-->
						 {if $r['essence']==1 }<span class="icon2 com"></span>{/if}
						 <span class="icon2-1 com"></span>
					 </div>
					 <div class="source">
						 <span class="name">{$r['username']}</span><i>|</i><em class="time">{$r['createtime']|remianday=###}</em>
					 </div>
					 <div class="I_icon clear">
						 <span class="icon3 com"></span><em>{$r['hits']}</em>
						 <span class="icon4 com"></span><em>{$r['like_num']}</em>
						 <span class="icon5 com"></span><em>{$r['reply_num']}</em>

						 <i class="time">{if $r['updatetime']}{$r['updatetime']|remianday=###}{/if}</i>
					 </div>
				 </a>
			 </div>
        </volist>          
             
		 </div>
		 

	 </div>
<div class="psges" name="{$url_s}&p=2">下拉加载更多</div>
      
      
      
   <a href="index.php?g=Mobile&m=Zforum_theme&a=add&id=7&plateid={$plate['id']}" id="posting" class="posting"></a>
       <input id="cook_id" type="hidden" value="{php echo  cookie(username)}" />
      <style>
  #footer{ display:none}
  </style>  
<script>
$('#posting').click(function(){

          var sma=$("#cook_id").val();
         
              if(sma){

                  return true;
              }else{
                  alert('你未登录，请登录');
                 
				 return false;
               }

	  
	
	})


     $(window).scroll(function()
 
   {
 
    if ($(window).scrollTop() == $(document).height() - $(window).height())
 
    {
 
         var url=$('.psges').attr("name");
		 $('.psges').html('加载中...');
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				if(msg.list){
					var result_len=msg.list.length;
					for(var i=0;i<result_len;i++){
						
					       var html='';
					         html+='<div class="section Padding">';
				             html+='<a href="index.php?g=Mobile&m=Zforum_reply&a=index&id='+msg.list[i].id+'&plateid='+msg.plate.id+'">';
					         html+='<div class="title clear">';
						     html+='<h2><span class="color">【'+msg.plate.name+'】</span>'+msg.list[i].title+'</h2>';
						<!-- <span class="icon1 com"></span>-->
						     if(msg.list[i].essence=='1'){
						     html+='<span class="icon2 com"></span>';
							 }
						     html+='<span class="icon2-1 com"></span>';
					         html+='</div>';
					         html+='<div class="source">';
						     html+='<span class="name">'+msg.list[i].username+'</span><i>|</i><em class="time">'+msg.list[i].date+'</em>';
					         html+='</div>';
					         html+='<div class="I_icon clear">';
						     html+='<span class="icon3 com"></span><em>'+msg.list[i].hits+'</em>';
						     html+='<span class="icon4 com"></span><em>'+msg.list[i].like_num+'</em>';
						     html+='<span class="icon5 com"></span><em>'+msg.list[i].reply_num+'</em>';

						     html+='<i class="time">'+msg.list[i].update+'</i>';
					         html+='</div>';
				             html+='</a>';
			                 html+='</div>';
							
					 
					  $("#tabajax").append(html);
					}
					 $('.psges').attr('name','index.php?g=Mobile&m=News&a=index&id=8&p='+msg.p);
					 $('.psges').html('下拉加载更多');
					 
					}else{ $('.psges').html('没有更多');  }
				    
					
			   
			  
				}
	   
				
		});
	   
 
    }
 
   });
   

</script>    
